# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ChromePolicy.V1.Model.GoogleChromePolicyVersionsV1PolicySchemaNoticeDescription do
  @moduledoc """
  Provides special notice messages related to a particular value in a field that is part of a PolicySchema.

  ## Attributes

  *   `acknowledgementRequired` (*type:* `boolean()`, *default:* `nil`) - Output only. Whether the user needs to acknowledge the notice message before the value can be set.
  *   `field` (*type:* `String.t`, *default:* `nil`) - Output only. The field name associated with the notice.
  *   `noticeMessage` (*type:* `String.t`, *default:* `nil`) - Output only. The notice message associate with the value of the field.
  *   `noticeValue` (*type:* `String.t`, *default:* `nil`) - Output only. The value of the field that has a notice. When setting the field to this value, the user may be required to acknowledge the notice message in order for the value to be set.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :acknowledgementRequired => boolean() | nil,
          :field => String.t() | nil,
          :noticeMessage => String.t() | nil,
          :noticeValue => String.t() | nil
        }

  field(:acknowledgementRequired)
  field(:field)
  field(:noticeMessage)
  field(:noticeValue)
end

defimpl Poison.Decoder,
  for: GoogleApi.ChromePolicy.V1.Model.GoogleChromePolicyVersionsV1PolicySchemaNoticeDescription do
  def decode(value, options) do
    GoogleApi.ChromePolicy.V1.Model.GoogleChromePolicyVersionsV1PolicySchemaNoticeDescription.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.ChromePolicy.V1.Model.GoogleChromePolicyVersionsV1PolicySchemaNoticeDescription do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
